﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tracy.DataModel.UltraExplorer;
using Tracy.DataModel;

namespace Tracy.Plugins.Classifiers.EntryClassifiers
{
    public class TagClassifier : AbstractClassifier<Entry>
    {
        protected override List<string> GetCategories(Entry entry)
        {
            List<string> rtn = new List<string>();
            foreach(Tag tag in TracyFacade.Instance.TagManager.GetTags(entry, Parameter))
            {
                rtn.Add(tag.Value);
            }
            if (rtn.Count == 0)
            {
                rtn.Add("Other");
            }
            return rtn;
        }
    }
}
